package a01;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

@Component
public class Component02 {

    Logger logger = LoggerFactory.getLogger(Component02.class);

    @EventListener
    public void receive(UserRegisterEvent event){
        System.out.println("bbbb");
        logger.info("收到事件:{}",event);
    }
}
